package com.whfc.common.enums;

/**
 * @Description: 小程序页面
 * @version: 1.0
 */
public enum WxmpPage {

    HOME("/home", "首页"),
    MANAGECENTER("/managecenter1", "管理中心"),
    HARDWARELIST("/hardwarelist", "硬件管理"),
    MACMORE("/macmore", "设备数据中心"),
    SINGLEMAC("/singlemac", "工作详情"),
    LISTALL("/listall", "设备信息详情"),
    EMPLISTALL("/emplistall", "人员信息详情"),
    INDEX("/index", "载入页面"),
    MYLISTMAC("/mylistmac", "可绑硬件列表"),
    FEEDBACK("/feedback", "意见反馈"),
    MYMESSAGE("/mymessage", "我的消息"),
    INVITED("/invited", "我的邀请");

    private String value;

    private String desc;

    WxmpPage(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String value() {
        return value;
    }

    /**
     * 解析页面名称
     *
     * @param value
     * @return
     */
    public static String parseByValue(String value) {
        if (HOME.value.equals(value)) {
            return HOME.desc;
        }
        if (MANAGECENTER.value.equals(value)) {
            return MANAGECENTER.desc;
        }
        if (HARDWARELIST.value.equals(value)) {
            return HARDWARELIST.desc;
        }
        if (MACMORE.value.equals(value)) {
            return MACMORE.desc;
        }
        if (SINGLEMAC.value.equals(value)) {
            return SINGLEMAC.desc;
        }
        if (LISTALL.value.equals(value)) {
            return LISTALL.desc;
        }
        if (EMPLISTALL.value.equals(value)) {
            return EMPLISTALL.desc;
        }
        if (INDEX.value.equals(value)) {
            return INDEX.desc;
        }
        if (MYLISTMAC.value.equals(value)) {
            return MYLISTMAC.desc;
        }
        if (FEEDBACK.value.equals(value)) {
            return FEEDBACK.desc;
        }
        if (MYMESSAGE.value.equals(value)) {
            return MYMESSAGE.desc;
        }
        if (INVITED.value.equals(value)) {
            return INVITED.desc;
        }

        return "";
    }


}
